<?php
    session_start();
    include 'common/check.php';
    include '../entity/rfq_entity.php';
    include '../business/rfq_manager.php';

    $rfqEntity = new RFQEntity();
    $rfqMng = new RFQMng();

    $rfqEntity->id                  = "-1";
    $rfqEntity->categoryID          = $_SESSION['rfq_categoryID'];
    $rfqEntity->marketID            = $_SESSION['rfq_marketID'];
    $rfqEntity->requireQC           = $_SESSION['rfq_requireDC'];
    $rfqEntity->process             = $_SESSION['rfq_process'];
    $rfqEntity->quantity            = $_SESSION['rfq_quantity'];
    $rfqEntity->measure             = $_SESSION['rfq_measure'];
    $rfqEntity->annualUsage         = $_SESSION['rfq_annualUsage'];
    $rfqEntity->neededDate          = $_SESSION['rfq_neededDate'];
    $rfqEntity->awardDate           = $_SESSION['rfq_awardDate'];
    $rfqEntity->deliveryDate        = $_SESSION['rfq_deliveryDate'];
    $rfqEntity->paymentTerm         = $_SESSION['rfq_paymentTerm'];
    $rfqEntity->paymentMethod       = $_SESSION['rfq_paymentMethod'];
    $rfqEntity->referencePrice      = $_SESSION['rfq_referencePrice'];
    $rfqEntity->targetPrice         = $_SESSION['rfq_targetPrice'];
    $rfqEntity->folder              = $_SESSION['rfq_folder'];
    $rfqEntity->shippingCost        = $_SESSION['rfq_shippingCost'];
    $rfqEntity->addressID           = $_SESSION['rfq_addressID'];
    $rfqEntity->instructions        = $_SESSION['rfq_instructions'];
    $rfqEntity->rfqIntent           = $_SESSION['rfq_rfqIntent'];
    $rfqEntity->usageDetails        = $_SESSION['rfq_usageDetails'];
    $rfqEntity->industry            = $_SESSION['rfq_industry'];
    $rfqEntity->requiredNDA          = $_SESSION['rfq_requiredNDA'];
    $rfqEntity->files               = $_SESSION['upload'];
    $rfqEntity->inTime              = time();
    $rfqEntity->inUser              = $_SESSION['userID'];

    $rfqID = $rfqMng->update($rfqEntity);
?>
